import Vue from "vue";
import Router from "vue-router";
import App from "../view/app.vue";
import Home from "../view/app/home.vue";

Vue.use(Router);

var router = new Router();

router.map({
    '/home': {
        component: Home
    },
    '/about': {
        component: (resolve)=> {
            // 按需加载
            require(['../view/app/about.vue'], resolve);
        }
    }
});

router.redirect({
    '*': '/home'
});


router.start(App, '#app');
